﻿// ------------------------------------------------------------------------------
// <copyright file="Declarations.cs" company="skumaronline.com">
//    Copyright (C) 2012 Suresh Kumar T.
//
//    This program is free software; you can redistribute it and/or
//    modify it under the terms of the GNU General Public License
//    as published by the Free Software Foundation version 2
//    of the License.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    http://www.gnu.org/licenses/gpl-2.0.html
//
// </copyright>
// ------------------------------------------------------------------------------

namespace StoreAppLib
{
    using System;
    using StoreAppLib.Controls;
    using StoreAppLib.Graph;

    /// <summary>
    /// Menu item invoke event handler
    /// </summary>
    /// <param name="sender">The source that trigger the menu</param>
    /// <param name="menuItem">Menu Item</param>
    public delegate void MenuItemInvokedEventHandler(object sender, MenuItem menuItem);

    /// <summary>
    /// Global navigation menu item invoke event handler. You can use the event to cancel global navigation or
    /// to send a value as navigation parameter to Navigating To page.
    /// </summary>
    /// <param name="sender">The global navigation menu item tapped</param>
    /// <param name="args">Navigation event arguments</param>
    public delegate void GlobalNavigationInvokedEventHandler(GlobalNavigationMenuItem sender, GlobalNavigationEventArgs args);

    /// <summary>
    /// Date time hanged event handler
    /// </summary>
    /// <param name="sender">The source</param>
    /// <param name="args">Date time change argument</param>
    public delegate void DateTimeChangedEventHandler(object sender, DateTimeEventArgs args);

    /// <summary>
    /// Value changed event handler
    /// </summary>
    /// <param name="sender">The source</param>
    /// <param name="value">New value</param>
    public delegate void ValueChangedEventHandler(object sender, object value);

    /// <summary>
    /// Chart item click event delegate
    /// </summary>
    /// <param name="sender">The sender</param>
    /// <param name="args">The argument</param>
    public delegate void ChartItemClickEventHandler(object sender, ChartItemClickEventArgs args);

    /// <summary>
    /// Popup alignment with respect to triggering source
    /// </summary>
    public enum PopupAlignment
    {
        /// <summary>
        /// Place horizontally align left of popup and triggering source and vertically align to center of triggering source
        /// </summary>
        Left = 1,

        /// <summary>
        /// Place top and horizontally align to center of triggering source
        /// </summary>        
        Top = 2,

        /// <summary>
        /// Place horizontally align right of popup and triggering source and vertically align to center of triggering source
        /// </summary>  
        Right = 4,

        /// <summary>
        /// Place bottom and horizontally align to center of triggering source
        /// </summary>    
        Bottom = 8,

        /// <summary>
        /// Place top left of triggering source
        /// </summary>    
        TopLeft = 3,

        /// <summary>
        /// Place top right of triggering source
        /// </summary>  
        TopRight = 6,

        /// <summary>
        /// Place bottom left of triggering source
        /// </summary>  
        BottomLeft = 9,

        /// <summary>
        /// Place bottom left of triggering source
        /// </summary>  
        BottomRight = 12,

        /// <summary>
        /// Place center of triggering source
        /// </summary>
        Center = 0,

        /// <summary>
        /// Place horizontally left to triggering source and vertically align to center of triggering source
        /// </summary>
        TowardsLeft = 16,

        /// <summary>
        /// Place horizontally right to triggering source and vertically align to center of triggering source
        /// </summary>
        TowardsRight = 32
    }

    /// <summary>
    /// Settings recommended width
    /// </summary>;
    public enum CharmSettingFlyoutWidth
    {
        /// <summary>
        /// Narrow width
        /// </summary>
        Narrow = 346,

        /// <summary>
        /// Wide width
        /// </summary>
        Wide = 646
    }

    /// <summary>
    /// Where to apply animation, whole fly out or the content
    /// </summary>
    public enum CharmSettingAnimation
    {
        /// <summary>
        /// Apply animation to content
        /// </summary>
        Content,

        /// <summary>
        /// Apply animation to fly out
        /// </summary>
        Flyout
    }
}
